<?php if (!defined('THINK_PATH')) exit();?><form id="pagerForm" method="post" action="<?php echo U();?>"> 
    <input type="hidden" name="pageNum" value="<?php echo ($_REQUEST["pageNum"]); ?>" />
    <input type="hidden" name="numPerPage" value="<?php echo ($_REQUEST["numPerPage"]); ?>" /> 
    <input type="hidden" name="_order" value="<?php echo ($_REQUEST["_order"]); ?>" />
    <input type="hidden" name="_sort" value="<?php echo ($_REQUEST["_sort"]); ?>" />    
</form>


<div class="pageHeader">
    <?php if(($act) == "1"): ?><form rel="pagerForm" onsubmit="return navTabSearch(this);" action="/tuyouApp/doctor/comment" method="post">
    <?php else: ?>
        <form rel="pagerForm" onsubmit="return navTabSearch(this);" action="/tuyouApp/doctor/auditComment" method="post"><?php endif; ?>
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    关联的帖子：<input type="text" name="title" value=''/>
                </td>
                <td>
                    回复人：<input type="text" name="nickName" value=''/>
                </td>
                <td>
                    内容关键字：<input type="text" name="content" value=''/>
                </td>
            </tr>
        </table>	
        <div class="subBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
            </ul>
        </div>
    </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <!--
            <?php if(($act) == "1"): ?><li><a class="add" href="/tuyouApp/doctor/show" target="dialog" mask="true"><span>添加</span></a></li><?php endif; ?>  
            -->
            <li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="id[]" href="/tuyouApp/doctor/delCom" class="delete"><span>批量删除</span></a></li>
            <?php if($_SESSION['type']> 1): if(($act) == "2"): ?><li><a title="确实审核这些记录吗?" target="selectedTodo" rel="id[]" postType="string" href="/tuyouApp/doctor/alleditCom" class="add"><span>批量审核</span></a></li>
                <?php else: ?>
                    <li><a title="确实设为待审核吗?" target="selectedTodo" rel="id[]" postType="string" href="/tuyouApp/doctor/auditCom" class="add"><span>批量待审</span></a></li><?php endif; endif; ?>  
            <!--
            <li><a class="edit" href="/tuyouApp/doctor/show/id/{doc_id}" target="dialog" mask="true" warn="请选择一条信息"><span>修改</span></a></li>
            -->
            <li class="line">line</li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="138">
        <thead>
            <tr>
                <th width="20"><input type="checkbox" group="id[]" class="checkboxCtrl"></th>
                <th width="30"  align="center">序号</th>
                <th width="120" align="center">关联的帖子</th>
                <th width="80" align="center">回复人</th>
                <th width="280">内容</th>
                <th width="100"  orderField='publishTime' <?php if($_REQUEST['_order'] == 'publishTime'): ?>class="<?php echo ($_REQUEST["_sort"]); ?>"<?php endif; ?> align="center">发布时间</th>
                <th width="80" align="center">操作</th>
            </tr>
        </thead>
        <tbody>
            <?php $i=1;?> 
            <?php if(is_array($com)): foreach($com as $key=>$list): ?><tr target="com_id" rel="<?php echo ($list["id"]); ?>">
                <td><input name="id[]" value="<?php echo ($list["id"]); ?>" type="checkbox"></td>
                <td><?php echo ($i); ?></td>
                <td><?php echo (getDoc($list["forumid"])); ?></td>
                <td><?php echo (getUserName($list["userid"])); ?></td>
                <td><?php echo ($list["content"]); ?></td>
                <td><?php echo ($list["commenttime"]); ?></td>                   
                <td>
                    <?php if(($act) == "2"): ?><a title="确定审核" target="ajaxTodo" href="/tuyouApp/doctor/alleditCom/id/<?php echo ($list["id"]); ?>" class="edit">审核 | </a> 
                        <a title="删除" target="ajaxTodo" href="/tuyouApp/doctor/delCom/id/<?php echo ($list["id"]); ?>" >删除</a>
                    <?php else: ?>
                        <a title="设为待审核" target="ajaxTodo" href="/tuyouApp/doctor/auditCom/id/<?php echo ($list["id"]); ?>" class="edit">待审核 | </a>
                        <a title="删除" target="ajaxTodo" href="/tuyouApp/doctor/delCom/id/<?php echo ($list["id"]); ?>" >删除</a><?php endif; ?>
                   
                </td>
            </tr>
            <?php $i++; endforeach; endif; ?>
        </tbody>        
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20">20</option>
                <option value="50">50</option>
                <option value="100">100</option>
                <option value="200">200</option>
            </select>
            <span>条，共<?php echo ($totalCount); ?>条</span>          
        </div>
        <div class="pagination" targetType="navTab" totalCount="<?php echo ($totalCount); ?>" numPerPage="<?php echo ($numPerPage); ?>" pageNumShown="6"  currentPage="<?php echo ($currentPage); ?>"></div>
    </div>
</div>